﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

/// <summary>
/// 代码生成详细配置参数
/// </summary>
public partial class CodeGenConfig : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    [JsonPropertyName("codeGen")]
    public CodeGenOutput CodeGen { get; set; } = new();

    /// <summary>
    /// 代码生成主表ID
    /// </summary>
    [DisplayName("代码生成主表ID")]
    [JsonPropertyName("codeGenId")]
    public long CodeGenId { get; set; }

    /// <summary>
    /// 数据库字段名
    /// </summary>
    [DisplayName("数据库字段名")]
    [JsonPropertyName("columnName")]
    public string? ColumnName { get; set; }

    /// <summary>
    /// 数据库字段名(首字母小写)
    /// </summary>
    [DisplayName("数据库字段名(首字母小写)")]
    [JsonPropertyName("lowerColumnName")]
    public string? LowerColumnName { get; set; }

    /// <summary>
    /// 字段描述
    /// </summary>
    [DisplayName("字段描述")]
    [JsonPropertyName("columnComment")]
    public string? ColumnComment { get; set; }

    /// <summary>
    /// .NET类型
    /// </summary>
    [DisplayName(".NET类型")]
    [JsonPropertyName("netType")]
    public string? NetType { get; set; }

    /// <summary>
    /// 作用类型（字典）
    /// </summary>
    [DisplayName("作用类型（字典）")]
    [JsonPropertyName("effectType")]
    public string? EffectType { get; set; }

    /// <summary>
    /// 外键实体名称
    /// </summary>
    [DisplayName("外键实体名称")]
    [JsonPropertyName("fkEntityName")]
    public string? FkEntityName { get; set; }

    /// <summary>
    /// 外键实体名称(首字母小写)
    /// </summary>
    [DisplayName("外键实体名称(首字母小写)")]
    [JsonPropertyName("lowerFkEntityName")]
    public string? LowerFkEntityName { get; set; }

    /// <summary>
    /// 外键显示字段
    /// </summary>
    [DisplayName("外键显示字段")]
    [JsonPropertyName("fkColumnName")]
    public string? FkColumnName { get; set; }

    /// <summary>
    /// 外键显示字段(首字母小写)
    /// </summary>
    [DisplayName("外键显示字段(首字母小写)")]
    [JsonPropertyName("lowerFkColumnName")]
    public string? LowerFkColumnName { get; set; }

    /// <summary>
    /// 外键显示字段.NET类型
    /// </summary>
    [DisplayName("外键显示字段.NET类型")]
    [JsonPropertyName("fkColumnNetType")]
    public string? FkColumnNetType { get; set; }

    /// <summary>
    /// 字典code
    /// </summary>
    [DisplayName("字典code")]
    [JsonPropertyName("dictTypeCode")]
    public string? DictTypeCode { get; set; }

    /// <summary>
    /// 列表是否缩进（字典）
    /// </summary>
    [DisplayName("列表是否缩进（字典）")]
    [JsonPropertyName("whetherRetract")]
    public string? WhetherRetract { get; set; }

    /// <summary>
    /// 是否必填（字典）
    /// </summary>
    [DisplayName("是否必填（字典）")]
    [JsonPropertyName("whetherRequired")]
    public string? WhetherRequired { get; set; }

    /// <summary>
    /// 是否是查询条件
    /// </summary>
    [DisplayName("是否是查询条件")]
    [JsonPropertyName("queryWhether")]
    public string? QueryWhether { get; set; }

    /// <summary>
    /// 查询方式
    /// </summary>
    [DisplayName("查询方式")]
    [JsonPropertyName("queryType")]
    public string? QueryType { get; set; }

    /// <summary>
    /// 列表显示
    /// </summary>
    [DisplayName("列表显示")]
    [JsonPropertyName("whetherTable")]
    public string? WhetherTable { get; set; }

    /// <summary>
    /// 列表排序显示
    /// </summary>
    [DisplayName("列表排序显示")]
    [JsonPropertyName("whetherOrderBy")]
    public string? WhetherOrderBy { get; set; }

    /// <summary>
    /// 增改
    /// </summary>
    [DisplayName("增改")]
    [JsonPropertyName("whetherAddUpdate")]
    public string? WhetherAddUpdate { get; set; }

    /// <summary>
    /// 主外键
    /// </summary>
    [DisplayName("主外键")]
    [JsonPropertyName("columnKey")]
    public string? ColumnKey { get; set; }

    /// <summary>
    /// 数据库中类型（物理类型）
    /// </summary>
    [DisplayName("数据库中类型（物理类型）")]
    [JsonPropertyName("dataType")]
    public string? DataType { get; set; }

    /// <summary>
    /// 是否是通用字段
    /// </summary>
    [DisplayName("是否是通用字段")]
    [JsonPropertyName("whetherCommon")]
    public string? WhetherCommon { get; set; }

}
